package com.ant.storage.controller;


import com.ant.storage.common.ResultVo;
import com.ant.storage.dto.InventoryDto;
import com.ant.storage.service.IInventoryLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author melon
 * @since 2022-04-13
 */
@RestController
@RequestMapping("/inventory-log")
@Api(tags = "物品库存日志接口")
public class InventoryLogController {

    @Autowired
    private IInventoryLogService inventoryLogService;

    @ApiOperation(value = "获取物品库存数据列表")
    @GetMapping("/getInventoryList")
    public ResultVo getInventoryList(InventoryDto inventoryDto) {
        return ResultVo.success("获取成功", inventoryLogService.querylist(inventoryDto));
    }

    @ApiOperation(value = "获取出入库数据列表")
    @GetMapping("/getCommodityList")
    public ResultVo getCommodityList(InventoryDto inventoryDto) {
        return ResultVo.success("获取成功", inventoryLogService.getCommodityList(inventoryDto));
    }

    @ApiOperation(value = "渠道")
    @GetMapping("/getChannelList")
    public ResultVo getChannelList(InventoryDto inventoryDto) {
        return ResultVo.success("获取成功", inventoryLogService.getChannelList(inventoryDto));
    }

    @ApiOperation(value = "渠道")
    @GetMapping("/findPersonalCensus")
    public ResultVo findPersonalCensus(InventoryDto inventoryDto) {
        return ResultVo.success("获取成功", inventoryLogService.findPersonalCensus(inventoryDto));
    }
}
